package kr.saeildamil.androidstudy.ch05;

import kr.saeildamil.androidstudy.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

public class FrameEx extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch05_frame);
		
		findViewById(R.id.frame_toggle_btn).setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				ImageView iv = (ImageView) findViewById(R.id.framae_img);
				if(iv.getVisibility() == View.VISIBLE){
					iv.setVisibility(View.GONE);
				}else{
					iv.setVisibility(View.VISIBLE);
				}
				
			}
		});
	}
}
